Skip to main content
POST
/
v1
/
mcp-configs
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

const mcpConfigView = await client.mcpConfigs.create({
  allowed_tools: ['string'],
  endpoint: 'endpoint',
  name: 'name',
});

console.log(mcpConfigView.id);
{
  "id": "<string>",
  "name": "<string>",
  "endpoint": "<string>",
  "allowed_tools": [
    "<string>"
  ],
  "create_time_ms": 123,
  "account_id": "<string>",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Parameters required to create a new McpConfig.

name
string
required

The human-readable name for the McpConfig. Must be unique within your account. The first segment before '-' is used as the service name for tool routing (e.g., 'github-readonly' uses 'github' as the service name).

endpoint
string
required

The target MCP server endpoint URL (e.g., 'https://mcp.example.com').

allowed_tools
string[]
required

Glob patterns specifying which tools are allowed from this MCP server. Examples: [''] for all tools, ['github.search_', 'github.get_*'] for specific patterns.

description
string | null

Optional description for this MCP configuration.

Response

McpConfig created successfully.

An McpConfig defines a configuration for connecting to an upstream MCP (Model Context Protocol) server. It specifies the target endpoint and which tools are allowed.

id
string
required

The unique identifier of the McpConfig.

name
string
required

The human-readable name of the McpConfig. Unique per account.

endpoint
string
required

The target MCP server endpoint URL (e.g., 'https://mcp.example.com').

allowed_tools
string[]
required

Glob patterns specifying which tools are allowed from this MCP server (e.g., ['github.search_', 'github.get_'] or ['*'] for all tools).

create_time_ms
integer<int64>
required

Creation time of the McpConfig (Unix timestamp in milliseconds).

account_id
string | null

The account ID that owns this config.

description
string | null

Optional description for this MCP configuration.